package domain;

import java.util.Date;
import java.util.Objects;
import java.util.Vector;

/**
 * 社团类
 *
 * @author liujiale
 */
public class Club {

    /** 社团ID */
    private int clubID;

    /** 社团名称 */
    private String clubName;

    /** 社团所在学院 */
    private String college;

    /** 社团描述 */
    private String description;

    /** 社团管理员列表 */
    private Vector<ClubAdministrator> adminList;

    /** 社团成员列表 */
    private Vector<User> memberList;

    /** 社团活动列表 */
    private Vector<Activity> activityList;

    /** 社团创建时间 */
    private Date createTime;

    /**
     * 空构造函数
     */
    public Club() {
    }

    /**
     * 构造函数
     *
     * @param clubID       社团ID
     * @param clubName     社团名
     * @param college      社团所在学院
     * @param description  社团描述
     * @param adminList    社团管理员列表
     * @param memberList   社团成员列表
     * @param activityList 社团活动列表
     * @param createTime  社团创建时间
     */
    public Club(int clubID, String clubName, String college, String description, Vector<ClubAdministrator> adminList, Vector<User> memberList, Vector<Activity> activityList, Date createTime) {
        this.clubID = clubID;
        this.clubName = clubName;
        this.college = college;
        this.description = description;
        this.adminList = adminList;
        this.memberList = memberList;
        this.activityList = activityList;
        this.createTime = createTime;
    }

    /**
     * Gets club id.
     *
     * @return the club id
     */
    public int getClubID() {
        return clubID;
    }

    /**
     * Sets club id.
     *
     * @param clubID the club id
     */
    public void setClubID(int clubID) {
        this.clubID = clubID;
    }

    /**
     * Gets club name.
     *
     * @return the club name
     */
    public String getClubName() {
        return clubName;
    }

    /**
     * Sets club name.
     *
     * @param clubName the club name
     */
    public void setClubName(String clubName) {
        this.clubName = clubName;
    }

    /**
     * Gets college.
     *
     * @return the college
     */
    public String getCollege() {
        return college;
    }

    /**
     * Sets college.
     *
     * @param college the college
     */
    public void setCollege(String college) {
        this.college = college;
    }

    /**
     * Gets description.
     *
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets description.
     *
     * @param description the description
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * Gets admin list.
     *
     * @return the admin list
     */
    public Vector<ClubAdministrator> getAdminList() {
        return adminList;
    }

    /**
     * Sets admin list.
     *
     * @param adminList the admin list
     */
    public void setAdminList(Vector<ClubAdministrator> adminList) {
        this.adminList = adminList;
    }

    /**
     * Gets member list.
     *
     * @return the member list
     */
    public Vector<User> getMemberList() {
        return memberList;
    }

    /**
     * Sets member list.
     *
     * @param memberList the member list
     */
    public void setMemberList(Vector<User> memberList) {
        this.memberList = memberList;
    }

    /**
     * Gets activity list.
     *
     * @return the activity list
     */
    public Vector<Activity> getActivityList() {
        return activityList;
    }

    /**
     * Sets activity list.
     *
     * @param activityList the activity list
     */
    public void setActivityList(Vector<Activity> activityList) {
        this.activityList = activityList;
    }

    /**
     * Gets created time.
     *
     * @return the created time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * Sets created time.
     *
     * @param createTime the created time
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof Club)) {
            return false;
        }
        Club club = (Club) o;
        return clubID == club.clubID && Objects.equals(clubName, club.clubName) && Objects.equals(college, club.college) && Objects.equals(description, club.description) && Objects.equals(adminList, club.adminList) && Objects.equals(memberList, club.memberList) && Objects.equals(activityList, club.activityList) && Objects.equals(createTime, club.createTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(clubID, clubName, college, description, adminList, memberList, activityList, createTime);
    }

    @Override
    public String toString() {
        return "Club{" +
                "clubID=" + clubID +
                ", clubName='" + clubName + '\'' +
                ", college='" + college + '\'' +
                ", description='" + description + '\'' +
                ", adminList=" + adminList +
                ", memberList=" + memberList +
                ", activityList=" + activityList +
                ", createdTime=" + createTime +
                '}';
    }

}
